package com.mine.pojo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

//使用 @ConfigurationProperties 注解的类生效
@EnableConfigurationProperties(MyBean.class)
@ConfigurationProperties(prefix = "mybean")
public class MyBean {
    private int id = 18;
    private String name = "zs";

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
